package wys.controller;

import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import wys.gets_ward_management;


import java.util.Map;
import java.util.Objects;

@RestController
public class easycontroller {
    @Autowired
    gets_ward_management G;
    @RequestMapping("productID")
    public List<Map> productID(){
        //获取数据库中的数据，并返回

        //ORM 对象关系映射
        return G.productID();
    }

    @RequestMapping("list1")
    public List<Object> list1(){
        List<Map> list = G.list1();
        List list1 = new ArrayList();
        List list2 = new ArrayList();
        for(Map item:list){
            list1.add(item.get("FeeType"));
            list2.add(item.get("Amount"));
        }

        List result = new ArrayList();
        result.add(list1);
        result.add(list2);
        return result;
    }
}
